package com.engine4cloud.tdf.supervision.dto.query;

import com.engine4cloud.tdf.common.core.constant.enums.CorElectronicFenceRuleTypeEnum;
import com.engine4cloud.tdf.common.core.constant.enums.ElectronicFenceTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 矫正对象电子围栏-请求对象
 *
 * @author wenjie
 * @date 2024-04-22 16:05:12
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "矫正对象电子围栏-请求对象")
public class JzdxElectronicFenceQueryDTO implements Serializable {
    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 矫正对象编号
     */
    @Schema(description = "矫正对象编号")
    @NotBlank(message = "矫正对象编号不能为空")
    private String rybh;

    /**
     * 围栏类型
     */
    @Schema(description = "围栏类型", example = "AREA")
    private ElectronicFenceTypeEnum wllx;

    /**
     * 限制规则
     */
    @Schema(description = "限制规则", example = "RESTRICTED_DEPARTURE")
    private CorElectronicFenceRuleTypeEnum xzgz;

    public JzdxElectronicFenceQueryDTO(String code, ElectronicFenceTypeEnum category, CorElectronicFenceRuleTypeEnum rule) {
        this.rybh = code;
        this.wllx = category;
        this.xzgz = rule;
    }

    public JzdxElectronicFenceQueryDTO(String code) {
        this.rybh = code;
    }

}